<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
      list-style: none;
      text-decoration: none;
      color:black;
    }
    .box{
      width: 200px;
      text-align: center;
    }
    .box li{
      background-color:skyblue;
      border: 1px solid #ccc;
    }
    a{
      display: block;
      height: 20px;
      border-bottom: 1px solid #ccc;
    }
    li>div{
      height: 200px;
      background-color: white;
      display: none;
    }
    .active{
      display: block;
    }
  </style>
</head>
<body>
  <div class="box">
    <ul>
      <li class="title">
        <a href="script:;">标题1</a>
        <div>我是弹出来的div1</div>
      </li>
      <li class="title">
        <a href="script:;">标题2</a>
        <div>我是弹出来的div2</div>
      </li>
      <li class="title">
        <a href="script:;">标题3</a>
        <div>我是弹出来的div3</div>
      </li>
      <li class="title">
        <a href="script:;">标题4</a>
        <div>我是弹出来的div4</div>
      </li>
    </ul>
  </div>
  <script src="../../jquery-1.12.4.min.js"></script>
  <script>
    //方法一
    $('.title').click(function(){
      $(this).children('div').addClass('active').parents().siblings().children('div').removeClass('active');
    });
    //方法二
    $('a').click(function(){
      $(this).next().show().parent().siblings().children('div').hide()
    });
  </script>
</body>
</html>